<?php

/**
 * Albireo Kernel
 *
 * @copyright  Copyright (c) 2010 Albireo Solutions
 * @package    Kernel
 */
namespace KernelModule\AclModule;

use Nette\Object;

/**
 * ACL entity
 *
 * @author Albireo Solutions
 */

class Acl extends Object {
    /** @var int */
    private $id = 0;
    /** @var AclRole */
    private $role = null;
    /** @var AclResource */
    private $resource = null;
    /** @var AclPrivilege */
    private $privilege = null;
    /** @var bool */
    private $allowed = false;

    /**
     * id getter
     *
     * @return int ID
     */
    public function getId() {
        return $this->id;
    }

    /**
     * ID setter
     *
     * @param int $id
     */
    public function setId($id) {
        $this->id = $id;
    }

    /**
     * Role getter
     *
     * @return AclRole
     */
    public function getRole() {
        return $this->role;
    }

    /**
     * Role setter
     *
     * @param AclRole $role Role
     */
    public function setRole(AclRole $role) {
        $this->role = $role;
    }

    /**
     * Resource getter
     *
     * @return AclResource
     */
    public function getResource() {
        return $this->resource;
    }

    /**
     * Resource setter
     *
     * @param AclResource $resource 
     */
    public function setResource(AclResource $resource) {
        $this->resource = $resource;
    }

    /**
     * Privilege getter
     *
     * @return AclPrivilege
     */
    public function getPrivilege() {
        return $this->privilege;
    }

    /**
     * Privilege setter
     *
     * @param AclPrivilege $privilege
     */
    public function setPrivilege(AclPrivilege $privilege) {
        $this->privilege = $privilege;
    }

    /**
     * Allow getter
     *
     * @return boolean
     */
    public function getAllowed() {
        return $this->allowed;
    }

    /**
     * Allow setter
     *
     * @param bool $allowed
     */
    public function setAllowed($allowed) {
        $this->allowed = $allowed;
    }
}

